﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mindfor.Web.Models
{
	/// <summary>
	/// Represents one page title element.
	/// </summary>
	public class PageTitleNode
	{
		/// <summary>
		/// Gets title text.
		/// </summary>
		public string Text { get; set; }

		/// <summary>
		/// Gets head text.
		/// </summary>
		public string HeadText { get; set; }

		/// <summary>
		/// Gets custom title node url.
		/// </summary>
		public string Url { get; set; }

		/// <summary>
		/// Gets or sets other linked data.
		/// </summary>
		public string Tag { get; set; }

		/// <summary>
		/// Gets or sets if current title node was added from view.
		/// </summary>
		public bool IsAddedFromView { get; private set; }

		/// <summary>
		/// Initializes new instance.
		/// </summary>
		/// <param name="text">Title text.</param>
		/// <param name="isAddedFromView">Value whether title node was added from view.</param>
		public PageTitleNode(string text, bool isAddedFromView)
		{
			Text = text;
			IsAddedFromView = isAddedFromView;
		}

		/// <summary>
		/// Returns string representation.
		/// </summary>
		/// <returns>String.</returns>
		public override string ToString()
		{
			return Text;
		}
	}
}
